home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 06 General Architectures / 06 Rabin / debuglog.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-12-10  |  1.1 KB  |  55 lines

  1. /* Copyright (C) Steve Rabin, 2001. 
  2.  * All rights reserved worldwide.
  3.  *
  4.  * This software is provided "as is" without express or implied
  5.  * warranties. You may freely copy and compile this source into
  6.  * applications you distribute provided that the copyright text
  7.  * below is included in the resulting source code, for example:
  8.  * "Portions Copyright (C) Steve Rabin, 2001"
  9.  */
  10.  
  11. #ifndef __DEBUGLOG_H__
  12. #define __DEBUGLOG_H__
  13.  
  14. #include "statemch.h"
  15. #include "global.h"
  16. #include "singleton.h"
  17. #include <list>
  18.  
  19. class LogEntry
  20. {
  21. public:
  22.     
  23.     LogEntry( void );
  24.     ~LogEntry( void ) {}
  25.  
  26.     objectID m_owner;
  27.     bool m_handled;
  28.  
  29.     float m_timestamp;
  30.     char m_statename[64];
  31.     char m_eventmsgname[64];
  32.  
  33.     //msg only info
  34.     objectID m_receiver;
  35.     objectID m_sender;
  36.  
  37. };
  38.  
  39. class DebugLog : public Singleton <DebugLog>
  40. {
  41. public:
  42.  
  43.     DebugLog( void );
  44.     ~DebugLog( void );
  45.  
  46.     void LogStateMachineEvent( objectID id, MSG_Object * msg, char* statename, char* eventmsgname, bool handled ); 
  47.  
  48. private:
  49.  
  50.     std::list<LogEntry*> m_log;
  51.  
  52. };
  53.  
  54.  
  55. #endif    // __DEBUGLOG_H__